<html xmlns="http://www.w3.org/1999/xhtml"  
     xmlns:sec="http://www.springframework.org/security/tags"
     xmlns:h="http://java.sun.com/jsf/html"      
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui">  

	<ui:composition template="mainLayout.xhtml">
		<ui:define name="header">
			<h1>#{msg.header}</h1>
		    <h2>#{msg.subheaderreservation}</h2>
		</ui:define>
		
		<ui:define name="leftToolbar">
			<h2>#{msg.options}</h2>
			<h:form>
				<p:menu>
					<sec:authorize access="hasAnyRole('ROLE_ADMIN', 'ROLE_OPERATOR')">
				        <p:submenu label="#{msg.reservations}">  
				            <p:menuitem value="#{msg.addreservation}" url="/pages/reservation/addReservation.xhtml" icon="ui-icon-extlink" /> 
				            <p:menuitem value="#{msg.addFixedReservation}" url="/pages/reservation/addFixedReservation.xhtml" icon="ui-icon-extlink" />
				            <p:menuitem value="#{msg.searchreservation}" url="/pages/reservation/searchReservation.xhtml" icon="ui-icon-extlink"/>  	
				            <p:menuitem value="#{msg.cancelMutipleReservation}" url="/pages/reservation/cancelMultipleReservation.xhtml" icon="ui-icon-extlink"/>  		            
				        </p:submenu>  
			        </sec:authorize>
			        <sec:authorize access="hasAnyRole('ROLE_DRIVER', 'ROLE_ADMIN')">
				        <p:submenu label="#{msg.travels}">  
				        	<sec:authorize access="hasRole('ROLE_DRIVER')">
				        		<p:menuitem value="#{msg.myNextTravels}" url="/pages/reservation/searchNextTravels.xhtml" icon="ui-icon-extlink"/>
				        	</sec:authorize>
				        	<p:menuitem value="#{msg.tripStatus}" url="/pages/reservation/travelStatus.xhtml" icon="ui-icon-extlink"/>
				        </p:submenu> 
			        </sec:authorize>
			        <sec:authorize access="hasAnyRole('ROLE_ADMIN', 'ROLE_OPERATOR')">
				        <p:submenu label="#{msg.extras}">  
				        	<p:menuitem value="#{msg.passengerList}" url="/pages/reservation/viewScheduleStatus.xhtml" icon="ui-icon-extlink"/>
				        </p:submenu>
			        </sec:authorize>
			    </p:menu>
		    </h:form>
		</ui:define>
	</ui:composition>
</html> 

